package Day_06;

import java.util.Random;
import java.util.Scanner;

public class StandardThreeDemo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请猜一个数：");
        Random rand = new Random();
        int num = rand.nextInt(100);
        while(true){
            int n = scan.nextInt();
            if(n < num){
                System.out.println("你猜小了，请重新猜吧：");
            }else if(n > num){
                System.out.println("你猜大了，请重新猜吧：");
            }else {
                System.out.println("你猜对啦！");
                break;
            }
        }
    }
}
